package com.tjhk.java.tech.thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @https://blog.csdn.net/sermonlizhi/article/details/122223118?spm=1001.2014.3001.5501
 * @https://blog.csdn.net/sermonlizhi/article/details/123314335?spm=1001.2014.3001.5502
 * @https://blog.csdn.net/sermonlizhi/article/details/123356877
 */
public class ThreadTest {

    public static void main(String[] args) {
        new Thread(()->{
            System.out.println("2132131");
        },"thread1").start();
        new Thread(){
            @Override
            public void run() {
                System.out.println("121231313");
            }
        }.start();
        ExecutorService ex = Executors.newSingleThreadExecutor();
        ex.submit(new Runnable() {
            @Override
            public void run() {
                System.out.println("353523235");
            }
        });
    }
}
